package com.androidhive.androidlistview;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;

public class MainActivity extends Activity {
	 public final static String EXTRA_MESSAGE = "com.example.sample.MESSAGE";
	 public final static String EXTRA_MESSAGE1 = "com.example.sample.MESSAGE";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	public void sendMessage(View view) {
		
		
		
		
		
		
		// System.out.println("HareKrishna");
	    Intent intent = new Intent(this, DisplayMessageActivity.class);
	    EditText editText = (EditText) findViewById(R.id.uid);
	    EditText editText1 = (EditText) findViewById(R.id.upw);
	    String message = editText.getText().toString();
	    String message1 = editText1.getText().toString();
	    intent.putExtra(EXTRA_MESSAGE, message);
	    intent.putExtra(EXTRA_MESSAGE1, message1);
	  //  System.out.println("HareKrishna");
	    Log.d("MyApp","I am here");
	    startActivity(intent);
	}
}
